import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '../components/HelloWorld.vue'
import Login from './../login/Login.vue'
import FirstEchart from './../laylout/FirstEchart.vue'
import Home from './../laylout/Home.vue'
import MyTable from './../laylout/MyTable.vue'
import SoldierChart from './../pages/SoldierChart.vue'
import BarChart from './../pages/BarChart.vue'
import MapChart from './../pages/MapEchart.vue'
import BeautifulChart from './../pages/BeautifulChart.vue'
import ThreeDimensional from './../pages/ThreeDimensional.vue'
import SnailChart from './../pages/SnailChart.vue'
import ChainMap from './../pages/ChainMap.vue'
import FatherToChild from './../vueKnowledge/FatherToChild.vue'
import ChildToFather from './../vueKnowledge/ChildToFather.vue'
import VueLife from './../pages/VueLife.vue'
import VueKnowledage from './../pages/VueKnowledage.vue'
import UseState from './../useVuex/UseState.vue'
import UseMutations from './../useVuex/UseMutations.vue'
import VuexAction from './../pages/VuexAction.vue'
import VuexModule from './../pages/VuexModule.vue'
import UseAxios from './../useAxios/UseAxios.vue'
import UseRouter from './../userRouter/UseRouter.vue'
import A from './../userRouter/A.vue'
import B from './../userRouter/B.vue'
import C from './../userRouter/C.vue'
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [{
      path: '',
      redirect: 'login'
    }, {
      path: '/helloWorld',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      children: [{
        path: '/first',
        name: 'FirstEchart',
        component: FirstEchart
      }, {
        path: '/table',
        name: 'MyTable',
        component: MyTable
      },{
        path: '/soldier-chart',
        name: 'SoldierChart',
        component: SoldierChart
      },{
        path: '/bar-chart',
        name: 'BarChart',
        component: BarChart
      },{
        path: '/map-chart',
        name: 'MapChart',
        component: MapChart
      },{
        path: '/beautiful-chart',
        name: 'BeautifulChart',
        component: BeautifulChart
      },{
        path: '/three-dimensional',
        name: 'ThreeDimensional',
        component: ThreeDimensional
      },{
        path: '/snail-chart',
        name: 'SnailChart',
        component: SnailChart
      },
      {
        path: '/chain-map',
        name: 'ChainMap',
        component: ChainMap
      },{
        path: '/father-to-child',
        name: 'FatherToChild',
        component: FatherToChild
      },{
        path: '/child-to-father',
        name: 'ChildToFather',
        component: ChildToFather
      },{
        path: '/vue-life',
        name: 'VueLife',
        component: VueLife
      },{
        path: '/vue-knowledage',
        name: 'VueKnowledage',
        component: VueKnowledage
      },{
        path: '/vuex-state',
        name: 'UseState',
        component: UseState
      },{
        path: '/vuex-mutations',
        name: 'UseMutations',
        component: UseMutations
      },{
        path: '/vuex-actions',
        name: 'VuexAction',
        component: VuexAction
      },{
        path: '/vuex-module',   
        name: 'VuexModule',
        component: VuexModule
      },{
        path: '/use-axios',   
        name: 'UseAxios',
        component: UseAxios
      },{
        path:'/use-router',
        name: 'UseRouter',
        component: UseRouter,
        children: [{
          path:'/use-router/c',
          name:'C',
          component: C
        }]
      },{
        path:'/a',
        name: 'A',
        component: A
      },{
        path:'/b/:id',
        name: 'B',
        component: B
      }
    ]
    }
  ]
})